import request from '@/utils/request'

// 登录方法
export function login(username: string, password: string) {
  return request<string>({
    url: '/login',
    method: 'post',
    data: {
      username,
      password,
    },
  })
}

// 获取用户详细信息
export function getInfo() {
  return request({
    url: '/userInfo',
    method: 'get',
  })
}

// 退出方法
export function logout() {
  return request({
    url: '/logout',
    method: 'get',
  })
}
